from django.contrib import admin
# Register your models here.

from index.models import Mapuser,Editer,Mfile
from index.models import Game,Map,Group,Category,Point,Region
from index.models import Icon,Iconclass
from index.models import Todocategory,Todo,Checklist,Check

#普通用户表
class MapuserManager(admin.ModelAdmin):
    list_display = ['uid','username','mail','phone','password','vcode','giteeid']
admin.site.register(Mapuser,MapuserManager)

#编辑者表
class EditerManager(admin.ModelAdmin):
    list_display = ['uid','token','username','mail','phone','password','vcode','giteeid']
admin.site.register(Editer,EditerManager)

#记录表
class MfileManager(admin.ModelAdmin):
    list_display = ['uid','token','mdfile','ltime','chlist']
admin.site.register(Mfile,MfileManager)





#游戏表
class GameManager(admin.ModelAdmin):
    list_display = ['id','name','title','img','bg_url','color']
admin.site.register(Game,GameManager)

#地图表
class MapManager(admin.ModelAdmin):
    list_display = ['id','name','title','img','size_w','size_h','color','layerurl','layers','gid']
admin.site.register(Map,MapManager)

#大类表
class GroupManager(admin.ModelAdmin):
    list_display = ['id','name','title','mid','issurvival']
admin.site.register(Group,GroupManager)

#小类表
class CategoryManager(admin.ModelAdmin):
    list_display = ['id','name','title','iconurl','shadowurl','cluster','status','grid','issurvival']
admin.site.register(Category,CategoryManager)

#点表
class PointManager(admin.ModelAdmin):
    list_display = ['id','type1','type2','type3','x','y','title','content','img','cid','issurvival']
admin.site.register(Point,PointManager)

#地区表
class RegionManager(admin.ModelAdmin):
    list_display = ['id','title','x','y','mid','issurvival']
admin.site.register(Region,RegionManager)





#图标表
class IconManager(admin.ModelAdmin):
    list_display = ['iid','img','gid']
admin.site.register(Icon,IconManager)

#图标类表
class IconclassManager(admin.ModelAdmin):
    list_display = ['id','title','color']
admin.site.register(Iconclass,IconclassManager)





#事件类别表
class TodocategoryManager(admin.ModelAdmin):
    list_display = ['id','title','gid']
admin.site.register(Todocategory,TodocategoryManager)

#事件表
class TodoManager(admin.ModelAdmin):
    list_display = ['id','title','classid','classtitle','info','gid','mid','mtitle','pointurl']
admin.site.register(Todo,TodoManager)

#检查表列表
class ChecklistManager(admin.ModelAdmin):
    list_display = ['id','title','gid']
admin.site.register(Checklist,ChecklistManager)

#检查事项表
class CheckManager(admin.ModelAdmin):
    list_display = ['id','lid','content']
admin.site.register(Check,CheckManager)